<?php
$filename = 'http://hcm.24h.com.vn/bong-da/nha-truoc-vong-8-thach-thuc-nha-vua-c48a491997.html';
$content = file_get_contents($filename);
$pattern = '#<div class="text-conent">(.*)</div>(\s)+<div class="nguontin">#ismU';
 
preg_match($pattern, $content, $matches);
 
$new_content = preg_replace('#(\s)+<div class="nguontin">#imsU', '', $matches[0]);

$new_content = preg_replace('#style="[^\"]*"#imsU', '', $new_content);
$new_content = preg_replace('#class="[^\"]*"#imsU', '', $new_content);
$new_content = preg_replace('#id="[^\"]*"#imsU', '', $new_content);

//echo $new_content;

$uploadDir = PUBLIC_PATH . '/files/test';
$uploadUrl = PUBLIC_URL . '/files/test';
$get = new Zendvn_GetContent($uploadDir, $uploadUrl);
echo $images = $get->getContent($new_content);